let _header = document.querySelector(".box_header");
let headline = document.querySelector(".headline");
let _img = document.querySelector(".ewmBox>img");
let save = document.querySelector(".save");

// console.log(_div);
// console.log(sessionStorage.getItem("img"));
_img.src = `${sessionStorage.getItem("img")}`;
_name = `${sessionStorage.getItem("_name")}`;
_da_time = sessionStorage.getItem("day_time");
cc_time = sessionStorage.getItem("cc_time");
// console.log(head);
// console.log(sessionStorage.getItem("_name"));
_header.innerHTML = `<div class="name_div" style="text-align: center">${_name}</div>`
// console.log(sessionStorage.getItem("_phone"));
// console.log(_img.src);
save.addEventListener("click", function () {

    download(_img.src, "预约二维码");
})

function download(url, name) {
    const aLink = document.createElement('a')
    aLink.download = name
    aLink.href = url
    aLink.dispatchEvent(new MouseEvent('click', {}))
}
headline.innerHTML=` <p>欢迎您在${_da_time}${cc_time}参观2019广州国际花卉艺术展暨中国插花花艺展。</p>`